/**
 * 
 */
package com.rpg.osric.item.bus;

import com.dalonedrau.jogl.engine.Interactive;
import com.rpg.base.Scriptable;
import com.rpg.osric.globals.OsricConsts;
import com.rpg.osric.item.OsricInteractiveObject;

/**
 * @author Donald
 *
 */
public class ShortSword extends OsricInteractiveObject implements Scriptable{
	/** the one and only instance of the <code>ShortSword</code> class. */
	private static ShortSword	instance;
	/**Render
	 * Gives access to the singleton instance of {@link ShortSword}.
	 * @return {@link ShortSword}
	 */
	public static ShortSword getInstance() {
		if (ShortSword.instance == null) {
			ShortSword.instance = new ShortSword();
		}
		return ShortSword.instance;
	}
	/** Hidden constructor. */
	private ShortSword() {
		super(Interactive.getInstance().getNextId());
		onInit();
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void onInit() {
		super.setLocalizedName("Short Sword");
		super.addIOFlag(OsricConsts.IO_ITEM);
		super.addIOFlag(OsricConsts.IO_WEAPON);
		super.getItemData().setWeaponType(OsricConsts.WEAPON_TYPE_SWORD_SHORT);
		// 1d6 damager vs small or medium
		super.getItemData().setDmgDieNumberSmMed(1);
		super.getItemData().setDmgDieRollSmMed(6);
		// 1d8 damager vs large
		super.getItemData().setDmgDieNumberLg(1);
		super.getItemData().setDmgDieRollLg(8);
		
		super.getItemData().setEncumbrance(3);
		super.getItemData().setPrice(8);
	}
}
